package com.atguigu.springcloud.service;

import com.atguigu.springcloud.dao.PaymentDao;
import com.atguigu.springcloud.entities.Payment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: shikong
 * @Date: 2020/7/26 10:57
 */

@Service
public class PaymentService {

    @Resource
    private PaymentDao paymentDao;

    public int insertPayment(Payment payment){

        return paymentDao.insert(payment);
    }

    public Payment getPaymentById(long id){

        return paymentDao.selectByPrimaryKey(id);
    }


}
